package ch14_advanced_gui;
import javax.swing.*;

import java.awt.*;
public class JDemoBorderLayout extends JFrame
{
   private JButton nb = new JButton("North Button");
   private JButton sb = new JButton("South Button");
   private JButton eb = new JButton("East Button");
   private JButton wb = new JButton("West Button");
   private JButton cb = new JButton("Center Button");
   public JDemoBorderLayout()
   {
     setLayout(new BorderLayout());
     add(nb, BorderLayout.NORTH);
     add(sb, BorderLayout.SOUTH);
     add(eb, BorderLayout.EAST);
     add(wb, BorderLayout.WEST);
     add(cb, BorderLayout.CENTER);
     setVisible(true);
     setSize(400, 150);
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   }
   public static void main(String[] args)
   {
      JDemoBorderLayout frame = new JDemoBorderLayout();
   }
}
